<script type="text/javascript">
$.extend($.fn.validatebox.defaults.rules,{
   checkAccount:{
    validator:function(value,param){     
//      var s = $("input[name="+param[0]+"]").val();
//      //因为日期是统一格式的所以可以直接比较字符串 否则需要Date.parse(_date)转换
//      return value>=s;
		printLog(value);
		printLog(param);
		var accountWebsite = $('#accountWebsite').combobox('getValue');
		var accountType = $('#accountType').combobox('getValue');
		printLog(accountWebsite);
		printLog(accountType);
		var rs = true;
		if(accountWebsite&&accountType&&(accountType=='1')) {
			jmaxSyncAjax('transAccount.do?checkAccountTypeIsExit',{websiteId:accountWebsite,accountType:accountType},function(data) {
				printLog('rs1='+rs);
				rs = data;
			});
		}
		printLog('rs2='+rs);
		return rs;
    },
    message:'同一网点只允许一个预付款帐户'
   }
  });
</script>
<table cellpadding="5">
	<input name="id" type="hidden" value="${(transAccountItem.id)!}" />
	<tr>
		<td class="tbLabel">所属网点:</td>
		<td>
			<@eu.comboBox id="accountWebsite" disabled="${disabled}" url="transWebSite.do?loadWebsiteCombox&value=${(transAccountItem.websiteId)!}" required="true" name="websiteId" validType="checkAccount[]"/>
		</td>
		<td class="tbLabel">账户名:</td>
		<td>
			<input name="accountName"  class="easyui-validatebox textbox" <#if disabled=='true'>readonly="readonly"</#if> data-options="required: true" value="${(transAccountItem.accountName)!}"/>
		</td>
		<td class="tbLabel">账户类型:</td>
		<td>
			<@eu.comboBox id="accountType" disabled="${disabled}" name="accountType" required="true" url="common.do?loadComboBox&key=ACCOUNT_TYPE&value=${(transAccountItem.accountType)!}"   validType="checkAccount[]"/>
		</td>
		
	</tr>
	<tr>
		<td>账户余额:</td>
		<td>
			<input name="accountBalance" style="width:157px;" class="easyui-numberbox" readonly="readonly" precision="2" data-options="required: true,width:157" value="${(transAccountItem.accountBalance)!'0'}"/>
		</td>
		<td>警戒金额:</td>
		<td>
			<input name="warnBalance"  class="easyui-numberbox" style="width:158px;"  precision="2" data-options="required: true" value="${(transAccountItem.warnBalance)!}"/>
		</td>
		<td>停用金额:</td>
		<td>
			<input name="stopBalance"  class="easyui-numberbox"  precision="2" data-options="required: true,width:157" value="${(transAccountItem.stopBalance)!}"/>
		</td>
	</tr>
	<tr>
		<td>开通日期:</td>
		<td>
			<input name="openDate" style="width:160px;" class="easyui-datebox" data-options="required: true,disabled:${disabled}" value="${(transAccountItem.openDate)!}"/>
		</td>
		<td>联系人:</td>
		<td>
			<input name="contact"  class="easyui-validatebox textbox" data-options="required: false" value="${(transAccountItem.contact)!}"/>
		</td>
		<td>联系人电话:</td>
		<td>
			<input name="contactPhone"  class="easyui-validatebox textbox" data-options="required: false" value="${(transAccountItem.contactPhone)!}"/>
		</td>
	</tr>
	<tr>
		<td>备注:</td>
		<td colspan="3">
			<textarea style="height: 90px;width: 418px;" rows="6"  name="remark" class="easyui-validatebox textbox">${(transAccountItem.remark)!}</textarea>
		</td>
	</tr>
</table>
